#include "Embedded/EmbeddedGrid.h"

template <int Dim>
void EmbeddedGrid<Dim>::dump(std::ostream &os) const
{
  nodeLabels.dump(os);
  auto dx = spacing();
  os.write((char*)dx.data(), sizeof(Real)*Dim);
  int numBdryNodes = bdryNodes.size();
  os.write((char*)&numBdryNodes, sizeof(int));
  for(const auto &idx : bdryNodes) {
    auto bdryPoint = bdryPoints(idx);
    os.write((char*)&bdryPoint, sizeof(Real) * Dim);
  }
  os.flush();
}

//============================================================
template class EmbeddedGrid<SpaceDim>;
